file=open('a.txt','r')
for line in file:
    print(line)

    '''with来读取文件'''
with open(('a.txt','r'))as file1:
    print(file1.read())